package pref.junx.flybird.activity.UpdataUserInfo;

import android.util.Log;

import pref.junx.flybird.entity.User;
import pref.junx.flybird.entity.User_idea;

/**
 * Created by 半生瓜 on 2017/8/7.
 */

public class UpdataUserInfoPresenter extends UpdataUserInfoConteact.Presenter {
    @Override
    protected void doreg(String account, String name, String password) {

    }

    @Override
    public void updata(User_idea user) {
        rxManager.add(
                modle.updata(user)
                        .subscribe(result -> {

                                    if(result.getData()){
                                        view.Success();

                                    }else {
                                        view.Fail();
                                    }

                                },
                                e -> {
                                    Log.i("test2", e.getMessage());
                                }));
    }
}
